package com.zhisheng.controller;

import com.zhisheng.Dto.EmpLoginDto;
import com.zhisheng.pojo.MyResponseResult;
import com.zhisheng.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private EmpService empService;
    @PostMapping
    public MyResponseResult<String> login(@RequestBody EmpLoginDto dto){
       //成功返回令牌，失败返回null
        return  empService.login(dto);

    }
}
